checkSelfPermission
open fun checkSelfPermission(@NonNull context: @NonNull Context, @NonNull permission: @NonNull String): Int(source)
Determine whether you have been granted a particular permission.
Return
PERMISSION_GRANTED if you have the permission, or PERMISSION_DENIED if not.
Parameters
context
context for which to check the permission.
permission
The name of the permission being checked.